Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move remaining credentials module to shared library #3979

Closed
wants to merge 1 commit into from

Conversation

timj-hh
Copy link
Contributor

@timj-hh timj-hh commented Oct 23, 2023

Summary

This change moves remaining credentials module after [this pull request] to the shared library. This is needed for ECS frontend, EC2 client, ECR factory. Usages in agent/ have been accordingly updated.

Implementation details

  • Move and re-merge agent/credentials/instancecreds to ecs-agent/credentials/instancecreds and agent/credentials/providers to ecs-agent/credentials/providers
  • Replace uses of seelog with logger
  • go mod init && go mod vendor ran in ecs-agent and agent directories.

amazon-ecs-agent/ecs-agent/credentials now looks like:

credentials
├── generate_mocks.go (Existed)
├── instancecreds
│   ├── instancecreds.go
│   ├── instancecreds_linux.go
│   ├── instancecreds_test.go
│   ├── instancecreds_unsupported.go
│   └── instancecreds_windows.go
├── interface.go (Existed)
├── manager.go (Existed)
├── manager_test.go (Existed)
├── mocks (Existed)
│   └── credentials_mocks.go (Existed)
└── providers
    ├── credentials_filename_linux.go
    ├── credentials_filename_unsupported.go
    ├── credentials_filename_windows.go
    ├── rotating_shared_credentials_provider.go
    └── rotating_shared_credentials_provider_test.go

Testing

make test and make run-integ-tests

New tests cover the changes: No new behavior is being introduced, so existing testing should suffice.

Description for the changelog

Move instance credentials and credential provider to shared library

Does this PR include breaking model changes? If so, Have you added transformation functions?
No

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants